/* 导航栏整体样式 */
.site-header {
    background-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

/* LOGO样式 */
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    white-space: nowrap; /* 防止LOGO文本换行 */
}

/* 右侧操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 移动端用户名 */
.mobile-username {
    display: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 汉堡按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* PC端导航 */
.desktop-nav {
    display: block;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.nav-link:hover {
    color: white;
}

.nav-user-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-username {
    color: white;
    font-weight: 500;
}

/* 移动端导航菜单 */
.mobile-nav {
    display: none;
    background-color: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-visible {
    display: block;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 1rem;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 响应式控制 */
@media (max-width: 767px) {
    /* 移动端显示元素 */
    .menu-toggle {
        display: flex;
    }
    .mobile-username {
        display: block;
    }
    
    /* 移动端隐藏PC元素 */
    .desktop-nav {
        display: none;
    }
    
    /* 移动端LOGO调整 */
    .header-logo {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    /* 桌面端隐藏移动元素 */
    .mobile-nav {
        display: none !important;
    }
    .mobile-username, .menu-toggle {
        display: none !important;
    }
}